/** @jsxImportSource @emotion/react */
import * as React from "react";
import {CCell, RCell, Table, TableBody, TableRow,} from "customize-easy-ui-component";
import {businessCatspMap} from "../../../agreement/AgreementList";
import {eqpTypeAllMap} from "../../../dict/eqpComm";

/**监检 管道的 封面概要；
 * */
export const 首页设备概况LdisN= ({theme, orc, rep } :{theme: any, orc:any, rep:any}
) => {
  const oBstype=businessCatspMap.get(rep?.isp?.bsType!);
  const gdBstype= '定期'===oBstype? '全面检验' : oBstype;
  return <Table fixed={ ["20%","%"] }  css={ {borderCollapse: 'collapse'} }>
    <TableBody rheight={40}>
      <TableRow>
        <RCell css={{border:'none'}}>使 用 单 位：</RCell>
        <CCell css={{border:'none',borderBottom:`1px dashed`}}>{orc.使用单位 || '／'}</CCell>
      </TableRow>
      <TableRow >
        <RCell css={{border:'none'}}>压力管道类别：</RCell>
        <CCell css={{border:'none',borderBottom:`1px dashed`}}>{eqpTypeAllMap.get(orc?.设备类别) || '／'}</CCell>
      </TableRow>
      <TableRow >
        <RCell css={{border:'none'}}>压力管道品种：</RCell>
        <CCell css={{border:'none',borderBottom:`1px dashed`}}>{eqpTypeAllMap.get(orc.设备品种) || '／'}</CCell>
      </TableRow>
      <TableRow>
        <RCell css={{border:'none'}}>压力管道名称：</RCell>
        <CCell css={{border:'none',borderBottom:`1px dashed`}}>{orc.管道设备名 || '／'}</CCell>
      </TableRow>
      <TableRow>
        <RCell css={{border:'none'}}>压力管道编号：</RCell>
        <CCell css={{border:'none',borderBottom:`1px dashed`}}>{orc.管道编号 || '／'}</CCell>
      </TableRow>
      <TableRow>
        <RCell css={{border:'none'}}>检验日期：</RCell>
        {orc.检验日期1? <CCell css={{border:'none',borderBottom:`1px dashed`}}>{orc.检验日期1} 至 {orc.检验日期}</CCell>
            :
            <CCell css={{border:'none',borderBottom:`1px dashed`}}>{orc.检验日期}</CCell>
        }
      </TableRow>
      <TableRow>
        <RCell css={{border:'none'}}>监察识别码：</RCell>
        <CCell css={{border:'none',borderBottom:`1px dashed`}}>{orc.监察识别码 || '／'}</CCell>
      </TableRow>
    </TableBody>
  </Table>;
};
